package com.wlj.servicehi.api;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HelloApi
 * @Description TODO
 * @Author wlj
 * @Date 2018/11/6  15:32
 * @Version 1.0
 */
@RestController
public class HelloApi {


    @Value("${server.port}")
    String port;

    @GetMapping("/hello")
    public String hello(@RequestParam(value = "name", defaultValue = "cloud") String name) {
        return "hello " + name + " ,i am from port:" + port;
    }
}
